package com.example.design;

import org.junit.Test;

import java.util.StringTokenizer;

public class TStringTokenizer {

    @Test
    public void test() {
        StringTokenizer tokenizer = new StringTokenizer("Hello\nWorld", "\n");
        while (tokenizer.hasMoreTokens()) {
            System.out.println(tokenizer.nextToken());
        }
    }
}
